IF(MNN_BUILD_TEST)
  file(GLOB_RECURSE MNN_TEST_CPP_SOURCES ${CMAKE_CURRENT_LIST_DIR}/*.cpp)
  file(GLOB_RECURSE MNN_TEST_OBJC_SOURCES ${CMAKE_CURRENT_LIST_DIR}/*.mm)
  set(MNN_TEST_SRCS "")
  LIST(APPEND MNN_TEST_SRCS ${MNN_TEST_CPP_SOURCES})
  IF(APPLE)
    LIST(APPEND MNN_TEST_SRCS ${MNN_TEST_OBJC_SOURCES})
  ENDIF()
  add_executable(run_test.out ${MNN_TEST_SRCS})
  target_link_libraries(run_test.out ${MNN_DEPS})
  target_include_directories(run_test.out PRIVATE ${CMAKE_CURRENT_LIST_DIR}/)
  add_dependencies(run_test.out MNN_SCHEMA_GEN)
  if(APPLE)
      find_library(FOUNDATION Foundation REQUIRED)
      target_link_libraries(run_test.out ${FOUNDATION})
  endif()
ENDIF()
